package com.huatai.exchange.deal;

import com.alibaba.fastjson.JSON;
import com.faneui.common.exception.BusinessException;
import com.google.common.collect.Maps;
import com.huatai.exchange.dal.model.ExcDataFileInfo;
import com.huatai.exchange.dal.model.ExcExchangeDataFile;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service("fileCreateMailDealService")
public class FileCreateMailDealServiceImpl extends AbstractFileCreateDealServiceImpl implements FileCreateDealService {

    @Override
    public void downloadCreateFile(StringBuffer fileNames, StringBuffer filePaths, ExcExchangeDataFile exchangeDateFile, ExcDataFileInfo dataFileInfo, Map<String, Object> resvMap) throws BusinessException {
        Map<String, Object> excDataFileMap = StringUtils.isBlank(exchangeDateFile.getProperties()) ? Maps.newHashMap() : JSON.parseObject(exchangeDateFile.getProperties(), HashMap.class);
        excDataFileMap.putAll(resvMap);// 继承上层参数
    }
}
